package com.jinly.ryder.monitor.dao.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.jinly.ryder.manage.service.model.InstanceType;
import com.jinly.ryder.monitor.service.model.MonitorKeyType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.concurrent.TimeUnit;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("monitor_data")
public class MonitorDataDO {
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 实例ID
     */
    @TableField(value = "instance_id")
    private Integer instanceId;

    /**
     * 保密实例类型
     */
    @TableField(value = "instance_type")
    private InstanceType instanceType;

    @TableField(value = "time")
    private Long time;

    @TableField(value = "key_type")
    private MonitorKeyType keyType;

    @TableField(value = "value")
    private Double value;

    @TableField(value = "cycle_unit")
    private TimeUnit cycleUnit;

    @TableField(value = "cycle_value")
    private Integer cycleValue;

    @TableField(value = "yn")
    private Boolean yn = true;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime created;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updated;
}
